<div>
	<div id="finish-html">
    <section class="note">

			<div class="titles fiex">
				
				<div class="fiex1 f-30 ellipsis"><span  data-l="1035"></span></div>
			</div>
        
        <div class="finish" style="padding-bottom: 0.3rem;">
            <svg class="g2" ><use xlink:href="#f_11"></use></svg>
            <div class="t1 f-30 lang"  data-l="1035"></div>
            <div class="t2 aaa lang"  data-l="1036"></div>
        </div>
		
		
		<div class="mag-20 pad-5 center fiex" style="border: 1px solid #eee; border-radius: 0.2rem;">
			<div class="fiex1"><img src="/images/m_03.png" /></div>
			<div class="fiex2">
				<span data-l="1174" class="mag-t-10"></span>			
				<span class="red f-bold f-30" id="point"></span>
			</div>
			<div class="fiex1"  id="getpoint" >
				<div class="get mag-t-20 mag-b-20 f-30">
					<a href="#!bind_phone-html" class="bon-red" style="padding: 0.1rem;" data-l="1175"></a>
				</div>
			</div>
		</div>
		
		<div class="mag-10 center  f-30" id="down1" style="display:none;">
			<a href="https://itunes.apple.com/cn/app/id1294612184" target="_blank" class="pad-10 red" id="ios" data-l="1185"style="display:none;"></a>
			<a href="https://play.google.com/store/apps/details?id=u.foodie.vc" target="_blank" class="pad-10 red" id="and" data-l="1185"style="display:none;"></a>
		</div>
		
		<div class="bank40"></div>
		
        <div class="order-bon f-30" style="position:relative; border:0; background: none; z-index: 0;">
            <a href="javascript:window.history.go(-1);" class="a1 lang"  data-l="1025"></a>
            <a href="#!root-html" class="a2 lang"  data-l="1037"></a>
        </div>
        <div class="bank40"></div>
        
        <style>
        	.openggs{ position: fixed; z-index: 10000; width: 100%; height: 100%; left: 0; top: 0;}
        	.openggs .b{ position: absolute; right: 10px; top: 10px; z-index: 2; background: rgba(0,0,0,0.5); color: #fff; border-radius: 3px; padding: 3px 7px; }
        	.openggs .a{ position: absolute; left: 0; top: 0; width: 100%; height: 100%; background-size: 100% auto; display: block;  z-index: 1;}
        </style>
        
        
        <div id="gglist-box"></div>
        
        <!--弹出广告层-->
        <script type="text/html" id="gglist-js">
        	{{if datu.adv}}
		        <div class="openggs" id="openggs" style="display: none;">
		        	<div class="b">
		        		<span>{{sg}}</span>
		        		<span> <i id="openggs_num">5</i>s
		        		</span>
		        	</div>
		        	<a href="javascript:;" onclick="gotof_01('{{datu.list[0].type}}','{{datu.list[0].url}}','{{datu.position_id}}','{{datu.list[0].adv_id}}')"  class="a" style="background-image: url({{oss + datu.list[0].thumb}}?x-oss-process=image/resize,m_fill,h_890,w_500);">
		        	</a>
		        </div>
	        {{/if}}
	        
	        {{if xiaotu.adv}}
	        <div class="game-list pad-20">
	        	<a  class="bk mag-b-10"  onclick="gotof_01('{{xiaotu.list[0].type}}','{{xiaotu.list[0].url}}','{{xiaotu.position_id}}','{{xiaotu.list[0].adv_id}}')"><img src="{{oss + xiaotu.list[0].thumb}}?x-oss-process=image/resize,m_fill,h_240,w_720"  style="width: 100%; height: auto;"  /></a>
	        </div>
	        {{/if}}
        </script>
        
        
        <div class="game-list pad-20">
        	
        
			<!--<a href="http://yhofoodie.com/activity/video_competition.html" class="bk mag-b-10" id="hd_weixin"  style="display: none;" ><img style="width: 100%; height: auto;" src="../images/hd01/hd01.jpg"   /></a>				
			-->
			
        	<div class="game_weix" style="display: none;">
        		<img src="../images/g1.png" style="width: 100%; height: auto;"  />
        	</div>
        	<div class="game_app"  style="display: none;">
        		<a href="javascript:;" class="bk g1 mag-b-20">
        			<img src="../images/g2.png" style="width: 100%; height: auto;"  />
        		</a>
        		<a href="javascript:;" class="bk g2 mag-b-20">
        			<img src="../images/g3.png" style="width: 100%; height: auto;"  />
        		</a>
        	</div>
        </div>
        
        
        <script>
        	var sg={
        		zh:"跳过广告",
        		en:"Skip ads",
        		ms:"Langkau iklan"
        	}
        	
        	//弹出广告
        	var opens1set;
        	var finish=JSON.parse(localStorage.getItem("finish_gg"))
        	finish["oss"]=ossroot;
        	finish["sg"]=sg[getCookie("language")]
        	$("#gglist-box").show().html(template("gglist-js", finish));
        	
        	var opens1=$("#openggs")
        	setTimeout(function(){
        		if(finish.datu.adv==0) return false;
        		
        		opens1.find(".b").click(function(){
	        		opens1.hide();
	        		clearInterval(opens1set);
	        	});
	        	var nimg=new Image();
	        	nimg.src= ossroot+finish.datu.list[0].thumb +'?x-oss-process=image/resize,m_fill,h_890,w_500';
	        	nimg.onload=function(){
	        		var opennum=5;
	        		opens1.fadeIn();
	        		 opens1set=setInterval(function(){
		        		opennum--;
		        		$("#openggs_num").text(opennum);
		        		if(opennum<=0){
		        			clearInterval(opens1set);
		        			opens1.hide();
		        		}
		        	},1000)
	        	}
	        	
	        	
	        	if(isAPP){
	        		opens1.find(".a").click(function(e){
		        		e.stopPropagation();
						e.preventDefault();
						plus.runtime.openURL($(this).attr("data-url"));
		        	});
	        	}
	        	opens1.on('touchmove', function (e) {e.preventDefault(); })
        	},800)
        	
        	if(isAPP){
        		$("#gg1").click(function(e){
	        		e.stopPropagation();
					e.preventDefault();
					plus.runtime.openURL($(this).attr("data-url"));
	        	});
        	}
        	
        	//banner广告弹出
			function gotof_01(type,url,position_id,adv_id){
				var type=type,
				url=url,
				position_id=position_id,
				adv_id=adv_id;
				
				console.log(type,url,position_id,adv_id)
				if(url=="" || url==undefined || url==0){
					return false;
				}
				
				//alert(url)
				//判断登录状态			
				if(url.indexOf("?")==-1){
					url+="?member_id="+getCookie("yingsoft_home_member_id")+"&adv_id="+ adv_id //版本更新需要更改数字，清缓存
				}else{
					url+="&member_id="+getCookie("yingsoft_home_member_id")+"&adv_id="+ adv_id   //版本更新需要更改数字，清缓存
				}
				
				var goto_U_app="http://api.foodie.vc/html/web_Yhofoodie/"
				$.ajax({
					type:"post",
					url:apidomain+"index.php?s=/Home/Adv/put_click",
					data: {position_id:position_id,adv_id:adv_id,member_id:getCookie("yingsoft_home_member_id")},
        			success: function (html) {
        				//1 纯图 2 app 内跳转 3 app内h5  4 浏览器打开
						switch (type){
							case '1': //纯图
								break;
							case '2'://app 内跳转
								//clicked(url)	
								break;
							case '3'://app内h5
//								setItem("url",url);
								//alert(123123)
								clicked(goto_U_app +"/APP/open_h5.html?httpurl="+encodeURIComponent(url))	
								break;
							case '4'://浏览器打开
								if(isAPP){
									plus.runtime.openURL(url);
								}else{
									window.location.href=url;
								}
								
								break;
							case '5'://无头
//								setItem("url",url);
								clicked(goto_U_app +"/APP/open.html?httpurl="+encodeURIComponent(url))	
								break;
							default:
								break;
						}
        			},
        			error:function(){
        				$.toast("提交广告参数错误！","text")
        			}
				});
				
				
				
			}
			
        	
        	//end
        	
        	
        	
        	
        	//判断是否为绑定手机号用户
        	if(localStorage.getItem("Isusernam")){
				$("#getpoint").hide();		
				//localStorage.removeItem("point")
			}else{
				localStorage.setItem("point",getUrlParam("point"))			
			}
			
        	
        	$("#point").text(getUrlParam("point"))
        	
        	$(".g1").on("click",function(){
        		window.location.href="http://api.foodie.vc/game/hmk/?from=app&r="+Math.random()
        	})
        	$(".g2").on("click",function(){
        		window.location.href="http://api.foodie.vc/game/cjmla/?from=app&r="+Math.random()
        	})
        	
        	//是否微信
        	if(isWeiXin()){
        		$(".game_weix,#hd_weixin").show();
        	}else{
        		$(".game_app,#hd_app").show();
        	}
        	
        	
        	if(!isAPP){
        		$("#down1").show();
        		if(ismobile("0")==0){
	    			$("#ios").show();					
				}else{
					$("#and").show();	
				}
        	}
        	
        	
        </script>
        
    </section>
    </div>
</div>
